﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DBA.Common;
using DBA.Model;
using DBA.Data;
using DBA.Data.ADO;
using DBA.Web.UI;

namespace DBA.Web.PublicService
{
    public partial class PublicServiceAdd : AdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack) 
            {
                if (Request.Params["id"] != null) 
                {
                    spanName.InnerHtml = Request.Params["name"];
                    txt_EmployeeID.Value = Request.Params["id"];
                }
            }
        }
        DataAccessLibrary dal = CommonQuery.DataAccessLibrary;

        protected void lnkSave_Click(object sender, EventArgs e)
        {
            string tt = txt_EmployeeID.Value;
            TeacherPublicService publicServiceInfo = ConvertHelper.ControlToModel<TeacherPublicService>(pan_tab.Controls);
            //studentInfo.EmployeeID = 10;
            hdResult.Value = dal.ModifyData.Insert<TeacherPublicService>(publicServiceInfo).ToString();
        }
    }
}